package thmp.parse;

import java.io.File;
import java.io.IOException;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

import thmp.parse.ParseState.ParseStateBuilder;
import thmp.search.Searcher;
import thmp.search.TheoremGet.ContextRelationVecPair;
import thmp.utils.FileUtils;

/*
 * Test class for ThmP1
 */
public class ThmP1TestRun {
	
	private static final boolean WRITE_UNKNOWN_WORDS_TO_FILE = true;

	static{
		/* Setting to data generation (rather than search) mode, so not to try to read
		 * in a bunch of serialized data used for search in CollectThm. 
		 * But *don't* do this when parsing on the server! Since it will affect search, which is running
		 * in the same JVM session.*/
		Searcher.SearchMetaData.set_gatheringDataBoolToTrue();
		FileUtils.set_dataGenerationMode();
	}
	public static void main(String[] args) throws IOException{
			//System.out.print("Got to main!");
			//ThmP1.buildMap();
			
			//ThmP1 p1 = new ThmP1();
			//String[] strAr = p1.preprocess("a disjoint or perfect field is a field".split(" "));
			//String[] strAr = p1.preprocess("quadratic extension has degree 2".split(" "));
			//String[] strAr = p1.preprocess("finite field is field".split(" "));
			//String[] strAr = p1.preprocess("field F extend field F".split(" "));
			
			//String[] strAr = p1.preprocess("a field or ring is a ring".split(" "));
			//String[] strAr = p1.preprocess("let T be any linear transformation ".split(" "));
			//String[] strAr = "let f be a linear transformation between V and W ".split(" ");
			//String[] strAr = "a linear transformation between V and W ".split(" ");
			//String[] strAr2 = "f is an invertible matrix".split(" ");
			//String[] strAr = p1.preprocess("if a field is ring then ring is ring".split(" "));
			//String[] strAr = p1.preprocess("a basis of a vector space consists of a set of linearly independent vectors".split(" "));
			//String[] strAr = p1.preprocess("finitely many vectors are called linearly independent if their sum is zero".split(" "));
			//String[] strAr = p1.preprocess("elements in symmetric group are conjugate if they have the same cycle type".split(" "));
			/*String[] strAr; 
			strAr = "for all x x is a number".split(" ");
			strAr = "suppose f is measurable and finite on E, and E has finite measure".split(" ");
			strAr = "the number of conjugacy class of the symmetric group is equal to the number of partitions of n".split(" ");*/			
			String st = "let H be a normal subgroup of the group G. G acts on H as automorphisms of H.";
			st = "conjugate elements and conjugate subgroups have the same order";
			st = "A is a group and is a subgroup";
			st = "let G be a group, conjugation by g is called a automorphism of G";
			st = "if p is an odd prime and n is an integer, then the automorphism group of the cyclic group of order p is cyclic";
			st = "let p be a prime and let V be an abelian group, with the property that b is c, then V is an n dimensional vector space over the finite field";
			st = "the automorphism group of the cyclic group of order 2 is isomorphic to Z";
			//st = "the number of conjugacy class of the symmetric group is equal to the number of partitions of n";
			//st = "let G be a group, then G is a group";
			st = "let G be a group and let p be a prime, a group of order that is a power of p is called a p group";
			st = "a group with order that is a power of p is called a p group. a subgroup of G that is a p group is called a p subgroup. p subgroup.";
			st = "a group with order that is a power of p is defined to be a p subgroup of G";
			st = "the p subgroups of G are denoted by Syl";
			st = "a subgroup of order a power of p is called a p subgroup, the number of p subgroup of G is 2"; //or "of the form p^k"
			st = "the number of p subgroup of G is 2";
			st = "subgroups of G exist";
			st = "there exists a finite semiring with order 11";
			st = "n is the index in G of the normalizer for any p subgroup";
			st = "let G be a group of order p, where p is a prime not dividing m";
			st = "Z for prime p are the only abelian simple groups";
			st = "Z/p for prime p are the only abelian simple groups";
			st = "the number of p groups of G is of the form kp";
			st = "let P be a p subgroup of G, the following are equivalent, "
					+ "P is the unique subgroup, P is normal in a group G, "
					+ "all subgroups generated by elements of p power order are p groups,"
					+ "if X is any subset of G such that x is a power of p for all x in X";
			st = "if X is any subset of G such that x is a power of p for all x in X, "
					+ "then X is a p group";
			st = "if the order of G is 60 and G has more than 1 p subgroup, then G is simple";
			st = "a nontrivial group is simple if it contains no nontrivial normal subgroups";
			//st = "";
			st = "if a group G is abelian, then it is nilpotent";
			st = "let p be a prime and let P be a group of order p, then P is nilpotent of nilpotence class at most d";
			st = "suppose that tex and tex are finite ring maps. then tex is finite";
			//String[] strAr = p1.preprocess("F is a extension over Q".split(" "));			
			st = "a  system tex of tex-modules over tex consists of a family of tex-modules tex indexed by tex and a family of tex-module maps tex such that for all tex tex";	
			st = "a field extends a field";
			//st = "given field of a field of a field";
			st = "A system tex of tex-modules over tex consists of a tex of tex-modules tex";
			st = "the colimit of the system tex is the quotient tex-module tex where tex is the tex-submodule generated by all elements tex where tex is the natural inclusion.";
			st = "a ring is field if and only if it is a field";
			//st = "A system tex of tex-modules over tex consists of a tex";
			//st = "A system tex over tex-modules";
			//st = "given a commutative diagram tex of abelian groups of family";
			//st = "given a commutative diagram of rows";
			//st = "given a commutative diagram ";
			//st = "tex is of  finite presentation if there exist integers tex and polynomials tex and an isomorphism of tex-algebras tex";
			st = "a ring is a field, if it is a field";
			st = "a system tex of tex-modules over tex consists of a family of tex-"
					+ "modules tex indexed by tex and a family of tex-"
					+ "module maps tex such that for all tex tex.";
			//st = "family of fields indexed by tex and a family of tex-module maps such that for all tex";
			st = "a  partially ordered set is a set tex together with a relation tex which is transitive  and reflexive.";
			st = "a  directed set tex is a partially ordered set tex such that tex is not empty and such that tex, there exists tex with tex";
			//st = "there exists tex with tex";
			//st = "a field that is a field extension";			
			//st = "a  partially ordered set is a set tex together with a relation tex which is transitive  and reflexive";
			//st = " a set tex together with a relation tex which is transitive  and reflexive";
			st = "Let tex be a ring. Let tex a multiplicative subset. Let tex, tex be tex-modules. Assume all the elements of tex act as automorphisms on tex. "
					+ "Then the canonical map tex induced by the localization map, is an isomorphism.";
			st = "Let tex be a ring. Let tex be a multiplicative subset. Let tex be an tex-module. Then tex where the partial ordering on tex is given by "
					+ "tex for some tex in which case the map tex is given by tex.";
			st = "let $(m_i, \\mu_{ij})$, $(n_i, \nu_{ij})$ be systems of $r$-modules over the same partially ordered set.";
			st = "systems of $f$-modules over the same partially ordered set.";
			st = "$f$-modules over set.";
			st = "for any three \\$r\\$-modules \\$m, n, p\\$, \\$\\$  \\$\\$";
			st = "let $r$ be a ring, let $m$ and $n$ be $r$-modules. ";
			st = "m is finitely presented";
			st = "an abelian group $n$ is called an  $$-bimodule} if it is both an $a$-module and a $b$-module, and the actions "
					+ "$a to end$ and $b to end$ are compatible in the sense that $b = a$ for all $a in a, bin b, xin n$. usually we denote it as $_an_b$.";
			st = "a system $$ of $r$-modules over $i$ consists of a family of $r$-modules ${m_i}_{i in i}$ indexed by $i$ and a family of $r$-module maps ${mu_{ij} : m_i to m_j}_{i leq j}$, such that for all $i leq j leq k$,";
			st = "a system $S$ of $r$-modules over $i$ consists of a family of $R$-modules ${m_i}_{i in i}$ indexed by $i$ and a family of $R$-module maps ${mu_{ij} : m_i to m_j}_{i leq j}$.";
			st = "an abelian group can be written as a direct sum of cyclic groups";
			st = "a finitely generated abelian group is isomorphic to a direct sum of cyclic groups";
			//st = "b is isomorphic to c";
			st = "functor is unique"; //try to parse "unique and field"
			st = "a ring called $ring, ,       ring$ ";
			st = "Let $j$ be a set. "; /////
			//st = "$s$ is a set"; /////
			//st = " For any $R$-multilinear mapping $f : M_1times ldots times M_r to P$ there exists a unique $R$-module homomorphism $f' : T to P$ such that $f'circ g = f$. Such a module $T$ is unique up to unique isomorphism."
			//		+ "We denote it $M_1 otimes_R ldots otimes_R M_r$ and we denote the universal multilinear map $(m_1, ldots, m_r) mapsto m_1 otimes otimes m_r$";
			//st = "field satisfying this property";
			st = "$(A, B)$-bimodule";
			st = "in the sense that F is a field";
			st = "there exists a pair consisting of $F, G$";
			st = "this function is $R$-linear";
			st = "in other words, F is field";
			st = "tensoring each term is perfect";
			st = "group is $R$-module if it is both F and B";
			st = "abelian group $N$ is called an  $(A, B)$-bimodule if it is both an $A$-module and a $B$-module";
			st = "$A, B$-module is perfect";
			st = "tensoring each term in the original right exact sequence preserves the exactness";
			st = "tensoring each term in the original right exact sequence preserves the exactness";
			st = "F and G is canonically isomorphic to H";
			st = "In other words, this is a field";
			st = "a field, a ring, and a group";
			st = "a field is said to be a ring";
			st = "for a multiplicative subset $S$ of $R$ we have a field";
			st = "for a multiplicative subset $S$ of $R$";
			st = "for subset S of R and for subset F of J";
			st = "group of F of F"; 
			st = "given a field , call it F";
			st = "Usually we call field F";
			//st = "for any $R$-linear mapping, there exists a map";
			st = "group of pure ideals";
			st = "then $R$ is a regular local ring";
			st = "if $R_1, R_3$ are rings";
			st = "this is a (perfect) field";
			//st = "this field is perfect and every field is good"; ///*****
			st = "$R$ is Noetherian and every R algebra is catenary.";
			//st = "A ring $R$ is said to be  universally catenary if $R$ is Noetherian and every $R$ algebra of finite type is catenary.";
			
			//st = "let $A : R$ be a ring";
			st = "A maximal ideal $I$ with $I$ proper";
			st = "ideal with $I$ proper";
			st = "Let $x_1, ldots, x_c in mathfrak m$ be elements";
			st = "Then $$ x_1, ldots, x_c text{ is a regular sequence }Leftrightarrow dim(R(x_1, ldots, x_c)) = dim(R) - c $$ If so $x_1, ldots, x_c$ can be extended to a regular sequence of length $dim(R)$ and each quotient $R/(x_1, ldots, x_i)$ is a Cohen-Macaulay ring of dimension $dim(R) - i$";
			//st = "Then $$ x_1, ldots, x_c text{ is a regular sequence }Leftrightarrow dim(R(x_1, ldots, x_c)) = dim(R) - c $$ If so $x_1, ldots, x_c$ can be extended to a regular sequence of length $dim(R)$";
			//st = "a field is a ring and each quotient $R/(x_1, ldots, x_i)$ is a Cohen-Macaulay ring of dimension $dim(R) - i$";
			//st = "a field is a ring and a field is a ring and a field is a ring";
			//st = "a field is a ring and a field is a ring";
			st = "this can be written as F";
			st = "this can be done";
			st = "this gives a field";
			st = "this sentence is a run-on";
			st = "for all but finitely many ideals $I$ ";
			st = "Pure ideals are determined by their vanishing locus.";
			st = "for all but finitely many I";
			st = "if $R$ is a Noetherian ring and $M$ is a Cohen-Macaulay $R$-module with $text{Supp}(M) = Spec(R)$";
			st = "ring is topological if and only if ring is topological";
			
			//st = "a field with extension $Q_2$ ";
			//st = "if $R$ is noetherian, $M$ is also noetherian";
			//st = "this is not coherent"; 
			//st = "for every $s in S$ we have a group";
			//st = "vanishing locus";
			//st = "fields are determined ";
			//st = "topological ideal";
			//st = "$I$ proper";
			//st = "Pure ideals are determined by their vanishing locus.";
			//st = "field are perfect and fields are rings";
			//st = "fields are fields and fields are rings";			
			//st = "assume there exists a module with $M = R$";
			//st = "this topological and perfect field";
			//st = "for subset S of A";
			//st = "for field of F"; //......
			//st = "for field";
			//st = "for field extension of G";
			st = "Let $x$ be an element of $R^n$";
			st = "Let G be a group and p be a prime";
			st = "let G be a field and R be a ring";
			//st = "there exists a field";
			//st = "both pairs are perfect";
			//st = "F is a field and $F = 4$";
			//Maps.readLexicon();
			st = "this is less than C";
			st = "inverse image of B in M";
			st = "for some submodule $MM$, where $MM$ is a submodule of N";
			st = "where $m$ is an element of $M$";
			//st = "if $m$ is an integer where $m$ is an element of $M$";
			st = "take the derivative of f";
			st = "derivative of f";
			//st = "let f be an element of a field";
			//st = "take the union of subsets of F";
			//st = "$m$ is an element of $M$";
			//st = "where $MM$ is a element of N";
			//st = "let S be the union of elements of a field"; //***
			//st = "let $a$ or $b$ be elements of a field";
			//st = "let $s \\subset S$ be an element of a set";
			//st = " B or C is true";
			st = "take the log of derivative of f"; 
			st = "$f$ is element of $f$";
			st = "$R$ is determined by its ideals";
			st = "let $R$ be a ring";
			st = "we say that f is a field";
			st = "Let $R \\to S$ be an epimorphism of rings.";
			st = "there exists a function f such that f is constant";
			
			st = "A ring map is surjective if and only if it is finite";
			st = "a ring is it is finite"; //ensure pronoun doesn't refer to previous ent!
			st = "f is an element of G";
			st = "there exists a function f such that f is holomorphic";
			//st = "f is an element of $R^n$";
			//st = "$R \to S$ is surjective ";
			
			st = "the rank of f is at most n";
			st = "f belongs to a finite set";
			//st = "f is at most g";
			//st = "let f be g";
			//st = "there exists a universal property";
			//st = "f is an element of a set";
			st = "take derivative of log of f"; //***
			st = "if $f=\\sum_i i$ has radius of convergence $r$, then $f$ is holomorphic on $D(0, r)$";
			
			st = "f is a function, f has root at 0";
			st = "if $f(z) = \\sum a_n z^n $ has radius of convergence $r$, then the function $f$ is holomorphic on $D(0, r)$,";
			//st = "Let $f(T) = a_1T + ...$ be a formal power series with $a_1 \\ne 0$, then there exists a unique power series $g(T)$ where $f(g(T)) = T$;";
			st = "$f(z)$ has radius of convergence $r$ and zeros along $z = 1/2$";
			//st = "f has radius of convergence r and zeros";
			//st = "matrix $M$";
			//st = "radius of convergence";
			//st = "formal power series";
			st = "the derivative of $f$ is equal to $\\sum na_n z^{n-1}$";
			st = "A ring map is surjective if and only if it is a finite epimorphism";
			st = "If $f(z) = a_0 + \\sum_n a_n(z-z_0)^n$ is analytic at $z_0$, then there exists a local analytic isomorphism $\\phi$ at 0, such that $f(z) = a_0 + \\phi(z-z_0)^m$ ";
			st = "the derivative of the log of $x$ is equal to $1/x$";
			//st = "derivative of log of f is g";
			//st = "radius of convergence of f is r";
			//st = "f has radius of convergence r";
			st = "Let $f(T) = a_1T + ...$ be a formal power series with $a_1 \\ne 0$, "
					+ "then there exists a unique power series $g(T)$ such that $f(g(T)) = T$";
			st = "the cardinality of the set $S$ is at most the cardinality of the set $R$"; 
			st = "f is a function and f has zeros";
			st = "this field is perfect, it has order $p$";
			st = "f is holomorphic on D";
			st = "if all its local rings are cohen-macaulay";
			st = "we have f as a function of x";
			st = "$I$ is pure";
			st = "A Noetherian ring $R$ is called Cohen-Macaulay if all local rings are Cohen-Macaulay."; //******<---
			st = "there exists a field with $F$ maximal and $K$ free"; //<-- revisit!
			st = "Suppose $R$ is a Cohen-Macaulay local ring. For any prime $p$ the ring $R$ is Cohen-Macaulay as well.";
			st = "for any prime p $R$ is a ring";
			st = "suppose $R$ is a ring";
			st = "$R$ is catenary if and only if $R/\\mathfrak p$ is catenary for every minimal prime $\\mathfrak p$.";
			st = "$R$ is universally catenary if and only if $R/\\mathfrak p$ is universally catenary for every minimal prime $\\mathfrak p$.";			
			st = "$R/\\mathfrak p$ is catenary for every minimal prime $\\mathfrak p$";
			st = "Any quotient over a (universally) catenary ring is (universally) catenary.";
			st = "$R_\\mathfrak m$ is universally catenary for all maximal ideals $\\mathfrak m$";
			st = "A ring $R$ is said to be  universally catenary if $R$ is Noetherian and every $R$ algebra of finite type is catenary."; //****Need revisit
			st = "A ring $R$ is catenary if and only if the topological space $\\Spec(R)$ is catenary";
			st = "if and only if $P$ is prime";
			st = "regular rings are regular";
			st = "$R/\\mathfrak p$ is catenary for every minimal prime $\\mathfrak p$";
			st = "f is a function with radius of convergence r and finitely many roots";			
			st = "all maximal chains of primes $\\mathfrak p = \\mathfrak q$ have the same (finite) length";
			st = "$M/gM$ is Cohen-Macaulay with maximal regular sequence $f_1, \\ldots, f_{d-1}$.";
			st = "$M/gM$ is Cohen-Macaulay with maximal regular sequence $f_1, \\ldots, f_{d-1}$.";
			st = "$R/\\mathfrak p$ is catenary for every minimal prime $\\mathfrak p$";
			st = "$R_\\mathfrak m$ is universally catenary for all maximal ideals $\\mathfrak m$";
			st = "disjoint finite chains of primes $\\mathfrak p = \\mathfrak q$ have the same length";
			st = "minimal polynomial of degree $p$, whose coefficients are real";			
			st = "f is a function with radius of convergence r and finitely many roots"; 
			st = "f is a function with pole and finitely many roots";
			
			st = "whose coefficients are finite";	
			st = "finite coefficients";
			st = "Here the right hand side is the set of $n$-tuples $(beta_n)$ of elements of $overline{F}$ such that $beta_i$ is a root of $P_ivarphi$.";
			st = "here right hand side is the set";
			st = "The {it compositum of $K$ and $L$ in $Omega$} written $KL$.";
			st = "definition linearly disjoint. Consider a diagram of fields as in (equation inside omega). We say that $K$ and $L$ are linearly disjoint over $k$ in $Omega$ if the map $$ K $$ is injective.. Consider a diagram of fields as in (equation-inside-omega). We say that $K$ and $L$ are linearly disjoint over $k$ in $Omega$ if the map $$  y_i $$ is injective.";
			st = "finite extension";
			st = "definition algebraic";
			
			st = "f is a function with perfect";
			st = "a field is a ring";
			st = "i' $r$ item as an abelian group for $m in M_i$ and $m' in M_{i'}$ we define the sum of the classes of $m$ and $m'$ in $M$ to be the class of $mu_{ij}(m) + mu_{i'j}(m')$ where $j  I$ is any index with $i q j$ and $i' leq j$";
			st = "Let $R$ be a ring. Let $S subset R$ be a multiplicative subset. ";
			st = "The category of $S^{-1}R$-modules is equivalent to the category "
					+ "of $R$-modules $N$ with the property that every $s in S$ acts as an automorphism on $N$.";
			st = "A Noetherian domain of characteristic zero is N-1 if and only if it is N-2 (i.e., Japanese).";
			st = "$X$ has a basis for the topology consisting of quasi-compact opens";
			st = "lemma-topology-spec:: Let $R$ be a ring. The topology on $X = Spec(R)$ has the following properties:   (*) $X$ is quasi-compact,  (*) $X$ has a basis for the topology consisting of quasi-compact opens, and  (*) the intersection of any two quasi-compact opens is quasi-compact. ";
			st = "This induces a 1-1 correspondence between open and closed subsets $U subset Spec(R)$ and idempotents $e in R$";
			st = "Let $R$ be a ring. A connected component of $Spec(R)$ is of the form $V(I)$, where $I$ is an ideal generated by idempotents such that every idempotent of $R$ either maps to $0$ or $1$ in $R I$.";
			st = "Let $R$ be a ring, it has maximal ideal $I$";			
			//st = "$B_p$ is a subspace of the vector space~$Z_p$. Thus we may  \\index{hpk@$H_p(K)$";
			//st = "\\xy qtriangle/{<-}`{<-}`{<--}/[B`\ftr F(A)`ftr F(A');u`f`\ftr F(tilde f)] morphism(1000,500)|r|/{<--}/<0,-500>[A`A';tilde f]   endxy end{equation}Some authors reverse the convention and call the morphism in~\ref{00078}co-universal and the one here universal.  Other authors, this one included,call both universal morphisms.";
			st = "$M/gM$ is Cohen-Macaulay with maximal regular sequence $f_1, \\ldots, f_{d-1}$.";			
			st = "$U$ is open without boundary";
			st = "abelian group is unique";
			st = "field F is contained in field H";
			st = "A maximal smooth atlas on a topological manifold $M$ is a  differential structure  structure differential differential structure on~$M$. A topological $n$-manifold which has been given a differential structure is a  smooth manifold  manifold smooth smooth $n$-manifold (or a  manifold differential  differential manifold differential $n$-manifold, or a  Cinfinity@$ C^infty$ (smooth) -manifold $ C^infty$ $n$-manifold).";
			st = "algebraically closed field";
			st = "Let $k subset K$ be a field extension. If $k$ is algebraically closed in $K$, then $K$ is geometrically irreducible over $k$.";
			st = "let $k$ be a separably algebraically closed field";
			st = "separably algebraically closed field";
			st = "Let $k subset K$ be a field extension.";			
			
			st = "consider a ring such that field is ring";
			st = "the log of derivative of $f$";
			st = "consider this ring such that field is separable algebraic";
			st = "Consider the subextension $k subset k' subset K$ such that $k subset k'$ is separable algebraic and $k' subset K$ is maximal with this property.";
			st = "If $K/k$ is a finitely generated field extension, then $[k' : k] < infty$.";
			st = "If $K/k$ is a finitely generated field extension";
			st = "Let $k subset K$ be an extension of fields.";
			st = "Then $text{Gal}(overline{k}/k)$ acts transitively on the primes of $overline{k} otimes_k K$.";
			st = "Let $R$, $S$ be $k$-algebras. If $Spec(R)$, and $Spec(S)$ are connected, then so is $Spec(R otimes_k S)$."; //<--revisit!
			st = "Let $k$ be a field. Let $R$ be a $k$-algebra. for every field extension $k \\subset k'$ the spectrum of $R \\otimes_k k'$ is connected";// and for every finite separable field extension $k subset k'$ the spectrum of $R otimes_k k'$ is connected.";
			st = "for every field extension $k \\subset k'$ the spectrum of $R \\otimes_k k'$ is connected";
			st = "If $S$ is geometrically connected over $k$, so is every $k$-subalgebra.";
			st = "A directed colimit of geometrically connected $k$-algebras is geometrically connected.";
			st = "The map $$ R \\longrightarrow R \\otimes_k S $$ induces a bijection on idempotents";
			st = "We say $S$ is geometrically integral over $k$ if for every field extension $k \\subset k'$ the ring of $S \\otimes_k k'$ is a domain.";
			st = "In this case $S$ is geometrically integral over $k$ if and only if $S$ is geometrically irreducible as well as geometrically reduced over $k$.";
			st = "$S$ is geometrically integral";
			st = "$S$ is perfectly integral";
			st = "Let $S$ be a geometrically integral $K$-algebra";
			st = "Let $R$ be a $k$-algebra and an integral domain";
			st = "Group $G$ acts on space $X$ by conjugation";
			st = "$s$ is an element of $X$";
			st = "Let $v : K^* to Gamma$ be a homomorphism of abelian groups such that $v(a + b) geq min(v(a), v(b))$ for $a, b in K$ with $a, b, a + b$ not zero.";
			st = "let $s$ and $t$ be elements, and $s$ is a point";
			st = "let $a, b$ be points with $a$ not zero";
			st = "$A$ is a ring with maximal ideal $ mathfrak m = 1$ and with group of units $ A^* = 0 . $";
			st = "$A$ is a ring with maximal ideal $$ mathfrak m = 1$$";
			st = "$A$ is ring";
			st = "$R$ is a ring with ideal $I$";
			st = "Ideals in $A$ correspond $1 - 1$ with ideals of $Gamma$.";
			
			st = "$A$ is $B$, and is $C$";
			st = "$f$ map ring to field";
			st = "This bijection is inclusion preserving, and maps prime ideals to prime ideals.";
			st = "$f$ map prime ideals to prime ideals";
			st = "A valuation ring is Noetherian if and only if it is a discrete valuation ring or a field";
			
			st = "Group $G$ acts on space $X$ by conjugation";
			st = "Any $F$-algebra map $f : E to E$ is an automorphism";
			st = " Let $A$, $A'$, $A_{fin}$, $B$, and $B_{fin}$ be the subsets of $Spec(S)$ introduced above.";			
			st = "for every element $x$";			
			st = "indexed family of morphisms";
			st = "If $x$ is a indexed family of vectors";
			
			st = "$C$ is an indexed family $x$ of morphisms";
			st = "relatively prime polynomials";
			st = "the group $G$ acts on the subgroup $H$ by conjugation";
			st = "A valuation ring is Noetherian if and only if it is a discrete valuation ring or a field";	
			st = "If $x$ is a summable indexed family of vectors";
			st = "if $R$ is commutative and $S$ is commutative";			
			
			st = "the map $f$ is linear";
			st = "$f$ maps $x$ to $y$";
			
			st = "if $R$ is a ring, if $S$ is commutative then $R$ is commutative";
			st = "if $R$ is commutative and $S$ is commutative, $S$ is abelian if $T$ is abelian";
			st = "if $R$ is a ring, $M$ is an $R$ module if $R$ is commutative";
			st = "Let $R to S$ be a ring of finite presentation.";
			st = "if $R to S$ is of finite type and $M$ is finitely presented as an $R$-module, "
					+ "Then $M$ is finitely presented as an $S$-module.";			
			st = "if $M$ is finitely presented as an $R$-module, then $M$ is finitely presented";
			st = "Let $R \\to S$ be a ring map. Let $M$ be an $S$-module. If $M$ is finite as an $R$-module, then $M$ is finite as an $S$-module.";
			st = "we say that $q$ is prime, and that $p$ is non-prime";
		
			st = "$p$ is prime or $q$ is prime";
			st = "$R \\to S$ is of finite type ";
			st = "$R \\to S$ is of finite type or $S$ is a finite type $R$-algebra, if there exists an $n in mathbf{N}$ and an surjection of $R$-algebras $R[x_1, ldots, x_n] \\to S$.";
			st = "A composition of ring maps of finite type is of finite type.";
			st = "Given $R \\to S' \\to S$ with $R \\to S$ of finite type, then $S' \\to S$ is of finite type.";
			st = "the following are equivalent: \\begin{enumerate} \\item $q$ is prime \\item $p$ is prime \\end{enumerate}";
			st = "Given $R \to S' \to S$, with $R \to S$ of finite presentation, and $R \to S'$ of finite type, then $S' \to S$ is of finite presentation.";
			st = "For any surjection $alpha : R[x_1, \\ldots, x_n] \to S$ the kernel of $alpha$ is a finitely generated ideal in $R[x_1, \\ldots, x_n]$";
			st = "Given $R \\to S' \\to S$, with $R \\to S$ of finite presentation, and $R \\to S'$ of finite type, then $S' \\to S$ is of finite presentation.";
			
			st = "Given ring of finite presentation and field of finite type";			
			st = "Let $R$ be a ring. For a principal ideal $J \\subset R$, and for any ideal $I \\subset J$ we have $I = J (I : J)$.";
			st = "Given $R \\to S' \\to S$, with $R \\to S$ of finite presentation, and $R \\to S'$ of finite type, then $S' \\to S$ is of finite presentation";
			st = "Let $\\mathcal{F}$ be a set of ideals of $R$.";
			st = "An ideal $I \\subset R$ which is maximal with respect to the property that $I \\cap S = \\emptyset$ is prime";
			st = "If every prime ideal of $R$ is finitely generated, then every ideal of $R$ is finitely generated";
			
			st = "For any constructible set $E \\subset \\Spec(R)$ the inverse image $f^{-1}(E)$ is constructible in $\\Spec(S)$";
			st = "there exists a ring map $R \\to S$ of finite presentation such that $T$ is the image of $\\Spec(S)$ in $\\Spec(R)$"; //Example
			st = "the image of a constructible subset of $\\Spec(S)$ is constructible in $\\Spec(R)$";
			st = "Noetherian property is stable by passage to finite type extension and localization";
			st = "Any finitely generated ring over a Noetherian ring is Noetherian";
			st = "If $R$ is a Noetherian ring, then so is the formal power series ring $R[[x_1, \\ldots, x_n]]$";
			st = "A noetherian affine scheme has finitely many generic points.";
			st = "going down holds for $R \\to S$ and there is at most one prime of $S$ above every prime of $R$";
			st = "there is at most one prime of $S$ above every prime of $R$";
			st = "there is one prime of $S$ above every prime of $R$"; //<--to parse!
			
			st = "Then morphisms lift along $\\text{Supp}(N) \\to \\Spec(R)$.";
			st = "We say $K$ is separably generated over $k$"; //<--to parse/group together
			st = "an ideal maximal among the ideals which do not contain nonzerodivisor is prime"; //Example for explosion
			st = "\\begin{enumerate}\\item ring \\item field \\end{enumerate}";
			st = "the following are equivalent: \\begin{enumerate} \\item $q$ is prime \\item $p$ is prime \\end{enumerate}"; //<--parse this!
			st = "Then morphisms lift along $\\text{Supp}(N) \\to \\Spec(R)$";
			st = "given ideals which are prime and do not contain zerodivisors"; // <--prime combined with do not contain zerodivisor.
			st = "An ideal maximal among the ideals which do not contain nonzerodivisor is prime";
			st = "If $R$ is a Noetherian ring, then so is the formal power series ring $R[[x_ 1, \\ ldots, x_n]]$";
			st = "there is one prime of $ S $ above every prime of $ R $";
			//st = "ring in field which do not contain zerodivisor is prime";
			st = "an ideal maximal among ring which do not contain nonzerodivisor is prime";
			st = "ring maximal among field which do not contain zerodivisor is prime";
			st = "We say $K$ is separable over $k$ if for every subextension $k \\subset K' \\subset K$ with $K'$ finitely generated over $k$";
			st = "denote by $\\GG_0$ the gauge group of harmonic gauge transformations";
			
			st = "suppose $F$ is a field";
			st = "$F$ denotes a field";
			st = "denote by $F$ a field";
			st = "denote $F$ as a field";
			st = "we define $F$ to be a field";
			
			st = "$F$ is said to be a field";
			st = "We define $\\mathtt{Squares} \\subset (\\R^2)^4$ to be the set of all quadruples of vertices of squares in $\\R^2$ traversed in anticlockwise order";
			st = "a $1$-chain in a manifold $M$ is a formal integer linear combination of curves $\\gamma: I \\to M$,";
			
			st = " a $1$-cycle is a $1$-chain that is zero boundary";
			st = "Two $k$-cycles are homologous if they differ by a $k$-boundary";
			st = "assume $F$ is a field, $F$ is perfect"; // <--look at context vector of this!
			st = "we define the winding number $W_{ii'}(y)$ by the similar formula $f = x$";
			st = "define $F$ to be field, and $C$ a ring";
			st = "a multiplicative subset of $R$";
			st = "$R$-generating set of $M$ is also an $S$-generating set of $M$";
			st = "define $F$ to be a field ";
			//conditional parse, flat parsing, 
			st = "define $F$ to be a field, $R$ a ring";
			st = "We define $ \\ mathtt{Squares} \\ subset (\\ R^2)^4$ to be the set of all quadruples of vertices of squares in $ \\ R^2$ traversed in anticlockwise order ";
			st = "a field over $ Q$ of numbers in $ R$";
			st = "if $M$ is a finitely presented $R$-module";
			st = "An abelian group $N$ is called an $(A, B)$-bimodule";
			st = "An abelian group $N$ is called an $(A, B)$-bimodule if it is an $A$-module and a $B$-module"; //<--parse this better			
			st = "given an $(A, B)$-bimodule";
			st = "function $f$ and $g$ are zero"; //<--make sure the and is parsed correctly!
			st = "$f$ maps $X$ to $Y$";
			st = "$X$ is such that $X$ is compact";
			st = "each quotient $M_i/M_{i-1}$ is isomorphic to $R/I_i$ for some ideal $I_i$ of $R$";
			st = "$X$ is compact where $Y$ is a space";
			st = "$R$ is of principal ideal ring";
			st = "for any topological space $X$ and map $X \\to \\text{Aut}(E/F)$ such that the action $X \\times E \\to E$ is continuous the induced map $X to \\text{Gal}(E/F)$ is continuous";
			st = "if there exists an $n \\in \\mathbf{N}$ and an surjection of $R$-algebras $R[x_1, \\ldots, x_n] \to S$";
			st = "$R$ is such that it is of principal ideal ring";
			st = "$F$ is to be a field"; //<--defluff this one!			
			st = "these fields without question are algebraically closed";
			st = "$F$ is said to be a field.";
			st = "Let $K$ be a field of characteristic $p > 0$. Let $K \\subset L$ be a separable algebraic extension. ";
			st = "Let $f$ be a continuous real-valued function on the compact interval $[a,b]$. Then there exists a point $c$ in $[a,b]$ such that $f(x) \\leq f(c)$ for all $x \\in [a,b]$.";
			//st = "Then there exists a point $c$ in $[a,b]$ such that $f(x) \\leq f(c)$ for all $x \\in [a,b]$.";
			st = "Let $X$ be a nonempty set, let $\\mathfrak{M} \\subset \\mathcal{P}(X)$ be an algebra and let $\\mu : \\mathfrak{M}$ be a finitely additive measure.";
			st = "Then $\\mu$ can be written as the sum of a countably additive measure and a purely finitely additive measure.";
			st = "Let $(X,\\mathfrak{M},\\mu)$ be a measure space with $\\mu$ finite and let ${E_j}_{j \\in J} \\subset \\mathfrak{M}$ be an arbitrary family of pairwise disjoint subsets of $X$.";
			st = "let ${E_j}_{j \\in J} \\subset \\mathfrak{M}$ be an arbitrary family of pairwise disjoint subsets of $X$.";
			st = "Then $\\mu(E_j)=0$ for all but at most countably many $j \\in J$.";
			st = "Then $F_p$ is field for all but finitely many $p \\in J$.";
			st = "$X$ is bounded";
			st = "If $u : X \\to \\mathbb{R}$ is an integrable function and $\\epsilon > 0$";
			st = "$w$ is lower semicontinuous and bounded below"; //<--parse consecutive adj!
			st = "Let $(X,\\mathfrak{M},\\mu)$ be a measure space with $\\mu$ finite";
			st = "let $\\mu_n : X \\to \\mathbb{R}$ be measurable functions converging pointwise to $\\mu$ almost everywhere";
			st = "$f_n$ is converging everywhere";
			st = "Then $\\{\\mu_n\\}$ converges uniformly";
			st = "Then the dual of $L^1(X)$ may be identified with $L^\\infty(X)$"; 
			st = "if the measure $\\mu$ is localizable and has zero and has the finite subset property"; 
			
			st = "$R$ is a ring if and only if $R $ is a field and has a zero";
			st = "Let $X$ be a locally compact Hausdorff space, and let $\\mu : \\mathcal{B}(X) \\to [0,infty]$ be a Radon measure";
			st = "An field is a nonzero ring where every nonzero element is invertible";
			st = "Every exact sequence of modules over a field ";
			st = "every field is afjkhshf";
			st = "For any ring map $R \to R'$ the ring map $R' \\to R' \\otimes_R S$ is surjective with locally nilpotent kernel.";
			st = "Let $\\varphi : R \to S$ be a surjective map with locally nilpotent kernel. Then $\\varphi$ induces a homeomorphism of spectra and isomorphisms "
					+ "on residue fields.";
			st = "Let $M$ be an $R$-module.  Then $M$ is flat if and only if it is the colimit of a directed system of free finite $R$-modules.";
			st = "Let $k \\subset k'$ be an algebraic purely inseparable field extension. Then for any $k$-algebra $R$ the ring map $R \\to k' \\otimes_k R$ induces a homeomorphism of spectra.";
			//st = "$f$ induces a homeomorphism of spectra";
			st = "If $u : X \\to \\mathbb{R}$ is an integrable function and $\\epsilon > 0$";
			st = "then $x>0$ for all $x\\in X$"; //<--assert not picked up.
			st = "suppose that $ f_i$ has iamge zero on $H$";
			st = "let $R$ be a symbol denoting a ring";
			st = " Let $R$ be a ring, and let $M$ be a finite $R$-module. There exists a filtration by $R$-submodules";
			st = "There exists an integer $a$ such that $(x + y)^{p^a}, p^a(x + y) \\in \\mathbf{Z}[x^{p^n}, p^nx, y^{p^m}, p^my]$";
			
			st = "if $F$ is a field, $F$ is a ring, and if $F$ is a group"; 
			st = "$F$ is a group, and if $F$ is a ring";
			st = "Let $R \to S$ be a ring map of finite type. For any presentations $\\alpha : R[x_1, \\ldots, x_n] \to S$, and $\beta : R[y_1, \\ldots, y_m] \\to S$";
			st = "The image of a constructible subset of $\\Spec(S)$ in $\\Spec(R)$ is constructible."; //<--to parse!!
			
			st = "The image of a constructible subset in $\\Spec(R)$ is constructible.";
			st = " let \\begin{align*} F \\end{align*} be a field";
			st = "There are exact sequences $$ M_2 \\otimes_R $$";
			st = "There are exact sequences $$ F $$";
			st = "let \\begin{align*} F \\end{align*} be a field and \\begin{align*} R \\end{align*} be a ring ";
			st = "a field is a ring where the group is a monoid";
			st = "Multiplication is defined by the rule that on pure tensors we have $$ (x_1 \\otimes x_2 \\otimes \\ldots \\otimes x_n) \\cdot (y_1 \\otimes y_2 \\otimes \\ldots \\otimes y_m) = x_1 \\otimes x_2 \\otimes \\ldots \\otimes x_n \\otimes y_1 \\otimes y_2 \\otimes \\ldots \\otimes y_m $$ and we extend this by linearity.";
			st = "Let $x_i$, $i \\in I$ be a given system of generators of $M$ as an $R$-module";
			st = "we use the notation ``$\\mathfrak p kjg $``";
			st = "there exists a finite $R$-module $M'$ and a map $M' \\to M$ which induces an isomorphism $S^{-1}M' \to S^{-1}M$."; 
			st = "subspace $\\kh^{1,1}(\\omega)\\subset \\ka^{1,1}(X)$ is independent of $\\omega$ if and only if $\tilde\\kk_X$ spans an $\\IR$-linear subspace of dimension $h^{1,1}(X)$";
			st = "subspace $\\kh^{1,1}(\\omega)\\subset \\ka^{1,1}(X)$ is independent of $\\omega$";
			st = "if and only if $\tilde\\kk_X$ spans an $\\IR$-linear subspace of dimension $h^{1,1}(X)$";
			st = "principal ideal ring is compact";
			st = "there exist roots of complex polynomial in field";
			st = "we shall concentrated on the approaches of classical partial differential equations and geometric measure theory";
			st = "Note on a pair of properties which characterize continuous functions";
			st = "Moreover this elliptic curve is isogenous to the quotient manifold of $\\C^*$ by the infinite cyclic subgroup generated by $\\lambda$ where $\\lambda$ is an eigenvalue of $\\C)$.";
			st = "this elliptic curve is isogenous to the quotient manifold of $\\C^*$ by the infinite cyclic subgroup generated by $\\lambda$ where $\\lambda$ is an eigenvalue";			
			//st = "this elliptic curve is isogenous to the infinite subgroup where $\\lambda$ is an eigenvalue";
			st = "curve is isogenous to subgroup where $\\lambda$ are an eigenvalue";
			st = "$f$ is holomorphic on $D(0, r)$, the derivative of $f$ is $\\sum_j j $";
			st = "let $Mx$ be orthogonal to the ground state";
			st = "The equality $G_3=G_{3_b}$ holds.";
			st = "Wallman-Frink proximity $\\delta_b$ associated with normal base $\\mathcal{B}$ is given by: ";
			st = "the real parts of $d_{ab}^k$ are given by \\begin{equation} \\Re d_{ab}^k =(2-\\delta_a^ - 2(2-\\delta_k^b) \\gamma_{kb}^a , \\end{equation}";
			st = "f is a function with radius of convergence r and finitely many roots";
			st = "A topological group $G$ is extremely amenable if and only if whenever $S\\sbs G$ is big on the left, ";
			st = "Then $b(G)$ is determined if and only if $W(G)$ is compact and determined; in this case $W(G)=b(G)$";
			st = "given separated and locally finitely-presented algebraic space";
			st = "given separated algebraic space";
			st = "given finitely generated algebra";
			st = "baire space is metrizable";
			st = "given residue field which is perfect";			
			st = "if $F $ is on $c(i)$-th column of $A$";
			st = "this field is perfect";
			st = "quadratic field lies above $Q$";
			st = " let $X$ be a compact manifold and $\\cA$ an Azumaya bundle over $X.$";
			st = "there is a quantization of a given isomorphism $b$ of the lifts of these b undles to $S^*(X/M)$ for which the null spaces";
			st = "if a knot $J$ is obtained from $7_4$ by a single crossing change";
			st = "If the linking number of $K_1$ and $S_1$ in $S^3$ is divisible by 15 then $J$ is not slice.";
			st = "If a crossing change converts $7_4$ into a slice knot $J$,";
			st = "then the corresponding curve $S_1$ in $M(7_4)$ is null homologous in $H_1(L(15,4),\\zz)$";
			st = "The difference $u_s(K) - g_s(K)$ can be arbitrarily large.";
			st = "we say $w$ is { relatively pseudo-Anosov} if the restriction of the map $w$ is pseudo-Anosov in $\\calm(U)$";
			st = "All words are relatively perfect except precisely words that are cyclically reducible to a non-zero power of $T_bT_a$";//<--parse except here!
			st = "Let $w$ be a word in $T_a,T_b$ which is not cyclically reducible to a power of $T_a$ or $T_b$";
			//st = "given a power in $T_a$ or $T_b$";	
			st = "the twisted $K$--theory $K^0(X,\\cA)$ is isomorphic to the Grothendieck group of Neumann equivalence class of projections in $C(X, \\K_\\cA)$";
			st = "the word $w$ can be cyclically reduced to $(T_aT_b)^n$ for some $n \\in \\mathbb{Z}$,"; //<--double adding!!
			st = " The curves $a,b$ have algebraic intersection number $2$,";
			st = "this is a nontrivial relation between Dehn twists in $\\mcg(S)$ if they are nontrivial."; //<--rank the scores correctly!
			st = "this group is commutative"; //<--this!
			st = "quantum cohomology is hard";
			st = " $M$ admits a typical surface foliation $\\F$."; //Let $M$ be a closed orientable  $3$--manifold. Then
			st = "let $M$ be a closed orientable  $3$--manifold";
			st = "Then there exists a point $c$ in $[a,b]$ such that $f(x) \\leq f(c)$ for all $x \\in [a,b]$";
			st = "there exists a point $c$ in $[a,b]$ for all $x \\in [a,b]$";
			st = "let $X$ be a pure measure. $\\mu$ can be written as a countably additive measure";
			st = "Let $X$ be a nonempty set, let $\\mathfrak{M} \\mathcal{P}(X)$ be an algebra and "
					+ "let $\\mathfrak{M} \\to [0,\\infty)$ be a finitely additive measure. Then $\\mu$ can be written "
					+ "as the sum of a countably additive measure and a purely finitely additive measure.";
			st = "there exists a point $c$ in $[a,b]$";
			st = "$M$ admits a surface";
			st = "Let $c$ be an integer and $r$ be a real number.";
			st = "if $x > 1$, then $A$ is a ring";				
			st = "$R_\\mathfrak m$ is universally catenary for all maximal ideals $\\mathfrak m$";
			st = "$R_\\mathfrak m$ is universally catenary in $R $";
			st = "given $z>2$, then $R$ is ring";
			st = "$x$ is given by $x=f(t)$";			
			st = "Under the hypotheses  $1=1$, we have $2=2$.";			
			st = "then all integers is prime";
			st = "there are infinitely many eleven in $g(zeta(f))$.";
			st = "The following identity holds:  $1=1$.";
			st = "then all integers are prime";
			st = "Given the hypotheses $1=1$, we have $2=2$.";
			st = "under the hypotheses $f > 1$";
			st = "we have $2=2$.";
			st = "The following identity holds:  $1=1$.";
			st = "$1=1$";
			st = "If $1=1$, then all integers are prime.";
			st = "if $1=1$";
			st = "Let $a$,$b$,$c$ be integers";
			st = "given $b ac$, then $ fsf$";
			st = "The nonzero integers $a$ and $b$ are said to be relatively prime if $(a,b)=1$.";
			st = "The nonzero integers $a$ and $b$ are relatively prime when $(a,b)=1$.";
			st = "The product of two primitive polynomials is itself primitive.";
			st = "$A$ is itself prime";
			st = "Any polynomial of odd degree that has real coefficients must have a real root.";
			st = "Any polynomial that has real coefficients is local";
			st = "Given any function $f$, there are infinitely many zeros in $g(zeta(f))$.";
			st = "field is perfect";
			st = "Let $ Q^n$ be a graph whose vertices are all the vectors $\\big{ x=(x_1,\\ldots, x_n)~|~x_ $ and two vectors $x$ and $y$ are adjacent if they differ in exactly one coordinate";
			st = "two vectors $x$ and $y$ are adjacent if they differ in exactly one coordinate";
			st = "Suppose that ${ haP^ , :  , t\\in\\TT\\}$$ is a semigroup of operators on $L_infty^V$, with generator $\\haclA$, and with finite spectral radius given by \\[sfsg\\]";
			st = "Finally, we define the {em generator} $\\haclA$ of the semigroup $\\{ \\haP^t\\,:\\,t\\in\\TT\\}$:We write $\\haclA g=h$ if \\be";
			st = "Let $(a,b)$ be such that $ \\ tau(a,b)=0$, then $ \\ mathcal{M}(a,b)$ is   non-empty and connected.";
			st = "$a S$ is non-empty and connected"; //<--parse this "non-empty" should be grouped together as connected
			st = "Let $(a,b)$ be such that $ \\ tau(a,b)=0$";
			st = "there are only finitely many classes of combinatorially equivalent esentations of complexity $n$.";
			st = "The line bundle $L \\ rightarrow A$ is positive in the sense of Kodaira if and only if it is positive in the sense of Grauert";
			st = "Let $C$ be a coalgebra over $R$, and let $L$ be a subset of $G(C)$.";
			st = "if any two grouplike elements in $L$ are $R$-linearly independent";
			st = "for all but finitely many values of $c$";
			st = "$P$ is prime for the ideal $P$ in $R$";
			st = "one has $x=y$";
			st = "${s_i}_n$ is bounded independent of $n$";
			st = "$S$ is perfect in $R$";			
			st = "${s_i}_n$ is bounded independent of $n$";
			st = "$S$ is perfect consistently";
			st = "The usual order on $R$ is a total order";
			st = "Let $n, m \\in N$ with $n < m$. Then no function $f : {1,2,...,m} -> {1,2,...,n}$ can be an injection";
			st = "Let $n, m \\in N$ with $n < m$"; //Revisit! Why span score 3 but no output string?
			st = " $c(A)<= c(B) $ and  $c(B) <= c(A) $ together imply that  $cA) = c(B)$.";
			st = "If $A$ is finite and $g:A ->B $ is a surjection, then $B$ is finite as well"; 			
			st = "Suppose that $f : [a, b] -> R$ is the difference of two bounded rising functions";
			st = "Any linear function $L : R^p \\[RightArrow] R^q$ is continuous";
			st = "Suppose that $f :[a,b] \\[RightArrow] R $  is continuous and we define $F : [a,b] \\[RightArrow] R$ by $F=\\int f dx$";
			st = "Suppose that $f_n->f$ pointwise and $f_n->g$ uniformly on $[a,b]$, Then we have $f=g$."; 
			//st = "suppose that $f_n$ converges to $f$ pointwise";
			//st = "Suppose that $f_n->g$ uniformly on $[a,b]$";
			st = "Then $f$ is increasing on $(a,b)$";
			//st = "$sfg$ converges independent of $n$";
			st = "Let $f:R^p -> R^q$ be differentiable at the point $x$";			
			st = "If   $\\sum a_k$ converges conditionally";
			st = "there is some rearrangement of $\\sum a_k$  which converges to $x$";
			st = "$S  is a ring";
			st = "There is a subset of $N$ that is countable"; //triggered cmd's got high scores but were not attached??
			st = "Then $ F'(x) = f(x)$ for all $x \\elem (a,b)$";	//revisit!			
			st = "The usual order on $R$ is a total order";
			st = "Let $n, m \\in N$ with $n < m$. Then no function $f : {1,2,...,m} -> {1,2,...,n}$ can be an injection.";
			st = "If $A$ is finite and $g:A ->B $ is a surjection, then $B$ is finite as well";
			st = "Let $A $ and  $B $ be sets. Then  $c(A)<= c(B) $ and  $c(B) <= c(A) $ together imply that  $cA) = c(B) $";
			st = "Then  $c(A)<= c(B) $ and  $c(B) <= c(A) $ together imply that  $cA) = c(B) $";
			st = "Let $A $ and  $B $ be sets. Then $s=1$ imply that $ sf g$";
			st = "Then all directional derivatives exist at $x$ and $D_uf(x)=Df(x)(u)$.";
			st = "If $A$ is finite and $g:A ->B $ is a surjection, then $B$ is finite as well. ";
			st = "If $g:A ->B $, then $B is finite.";
			st = "If $a \\elem R$ we define $a+ = max(a, 0)$ and $a\\[Minus] =\\[Minus] min(a, 0)$";
			st = "Suppose that $f :[a,b] \\[RightArrow] R $  is continuous and we define $F : [a,b] \\[RightArrow] R$ by  $F=\\int f dx$.";
			st = "Suppose that $f_n->f$ pointwise and $f_n->g$ uniformly on $[a,b]$.";//revisit, "and" parsing is off
			st = "Let $x \\elem R$. If $\\sum a_k$ converges conditionally, then there is some rearrangement of $\\sum a_k$  which converges to $x$";
			st = "$M/gM$ is Cohen-Macaulay with maximal regular sequence $f_1, \\ldots, f_{d-1}$.";
			st = "$R_\\mathfrak m$ is universally catenary for all maximal ideals $\\mathfrak m$";
			st = " we assume that this resolution is given by $\\Hilb^{G} (\\mathbb{C}^n)$ ";
			st = "We define a generalization of the Cartan matrix of the case $n=2$";			
			st = "$F$ does not lie over $Q$";
			st = "$F$ lies over $Q$";
			st = "$F$ is a field over $Q$";
			st = "$I$ is not prime";
			st = "$F$ is an extension that is finite over $Q$";
			st = "the twisted $K$-theory $K^0(X,\\cA)$ is isomorphic to Grothendieck group of Neumann equivalence class of projections in $C(X, \\K_\\cA)$";
			st = "take the derivative of log of $f $";
			st = "There are field in the class $\\mathcal{X}$ that are not finite modifications of rings.";
			st = "If the Alexander polynomial of $K$ is not $1$";
			st = "$\\partial \\Sigma$ is not a meridian for $K$";
			st = "for all components $U$ of $supp(w)$ which are not annuli"; //revisit! children added repeatedly in one parse.
			//for above, hypo[hyp[for all], [ent{called=$U$, name=component}][[ent{name=$supp(w)$}][verbphrase[verb[are not], [ent{name=annuli}]]which verbphrase[verb[are not]
			st = "Suppose that $f_n->g$ uniformly on $[a,b]$";
			st = "the derived series of $G=\\pi_1(\\sk)$ does not stabilize at finite $n$";
			st = "they do not intersect";
			st = "the colorings do not change for either arcs involved At a virtual crossing ";
			st = "all elements not conjugate to the powers of $T_a$ and $T_b$ are pseudo-Anosov";
			st = "$q$ has no zeros in $A$";
			st = "the element $ \\ r ho(\\ gamma)$ fixes no points in the interior of $I$";
			st = "$S^1\\ x M_K$ admits no symplectic structure";
			st = "Suppose the representations $ \\ tau$ of $B_n$ are not all faithful.";
			st = "The interchange of two distant critical points of the surface diagram does not change the induced map on homology. ";
			st = "We require the signed resolution res($T$) to coincide with res($S$)  on the circles which do not intersect this disc";//stucture
			st = "the probability $a_k(u)$ that there are no double gaps satisfies $$ \\ beta (u)^k\\ leq a_k (u)\\ leq \\ beta (u)^{k-1}$$";//revisit! Multiple children attached.
			st = "the holonomy of $ \\ partial \\ Sigma$ has no fixed points"; //also fix parse. assert[[ent{name=holonomy}][[ent{name=$ \ partial \ Sigma$}]of [ent{name=$ \ partial \ Sigma$}]],
			st = "there exist monomial ideals in ring";
			//st = "the probability $a_k(u)$ that there are no double gaps";// satisfies $$ \\ beta (u)^k\\ leq a_k (u)\\ leq \\ beta (u)^{k-1}$$";
			st = "Fix a rectangular Young diagram $R$, and consider all the products of Schur functions $s_\\lambda s_\\lambdac$, where $\\lambda$ and $\\lambdac$ run over all (unordered) pairs of partitions which are complementary with respect to $R$.";//inf loop on server!
			st = "where $\\lambda$ run over all pairs of partitions which are complementary with respect to $R$"; //revisit!
			st = "Fix a rectangular Young diagram $R$"; //parse this!
			st = "$s_n$ does not converge";
			st = "$J$ is not slice";
			st = "There are fields in the class $\\mathcal{X}$ that are not finite modificatios of rings";
			st = "If the Alexander polynomial of $K$ is not $1$";
			//st = "Let $p_1,\\dots,p_r$ be the preimages under $w$ of $c^\\ast_0$ with the property that one of the components of a punctured neighborhood of $p_j$ in $\\pa D_m$ maps to $\\gamma$.";
			//st = "Let $p_1,\\dots,p_r$ be the preimages under $w$ of $c^\\ast_0$";//too many parses!			
			st = "If $ \\ sum a_k$ converges conditionally, then there is some rearrangement of $ \\ sum a_k$  which converges to $x$";
			st = "we call $p  $ a prime";//remove "we call"
			
			//st = "signed resolution $res(T)$ to coincide with $RR$";
			st = "fix a rectangular Young diagram $R$ over a field";
			st = "polynomial $f$ has one root";
			st = "${s_n}_n$ converges uniformly to $x=1$";
			st = "the polynomial is $1$";
			st = "$f$ is a prime";
			st = "the holonomy of $\\partial \\Sigma$ has no fixed points";
			st = "The interchange of two distant critical points of the surface diagram does not change the induced map on homology";
			//st = "they do not intersect";
			st = "${s_n}_n$ converges uniformly to $x=1$";			
			st = "A morphism of C-algebras $f : A \\longrightarrow B$ with axiom is called a noncommutative Serre fibration";//revisit! first token detached
			//st = "if field is ring";
			//st = "this prime is called $p$";			
			st = "A morphism of algebras exists";			
			st = "the holonomy of $\\partial \\Sigma$ has no fixed points";
			st = "fix a $p$ over a $a$ order in $b$";
			st = "fix young diagram over a field";
			st = "A morphism of algebras exists";			
			st = "given an element f of a set $S$";
			st = "$A$ implies $B$ over field";
			st = "the polynomial $f$ has one root";
			st = "$\\lambda$ run over all pairs of partitions which are complementary with respect to $R$";
			st = "if $R$ is a ring, then $R_\\mathfrak m$ is universally catenary for all maximal ideals $\\mathfrak m$";
			st = "this field extension $R = F$ over $Q$ is rational";
			st = "A morphism of C-algebras $f : A \\longrightarrow B$ with axiom is called a noncommutative Serre fibration";
			st = "if $p$ is a prime and $p$ is odd, then $pq$ is odd";
			st = "$A$ is connected over ring";
			st = "$p$ is odd";
			st = "if $U$ is a space, $U$ is compact if $U\\subset X$";
			st = "the cellular deviation is singular"; 
			st = "given the sturmian supertrace";
			st = "given kontsevich's circle"; 
			st = "given field's extension";
			st = "we have $a=b$";
			st = "take a prime $p$";
			st = "There exists a field extension $\\mathbb{C}$ that is algebraically closed";			
			st = "There exists a field extension";
			st = "let $A$ be some simply connected space, then $B$ is trivial if $B$ is the fundamental group of $A$";
			st = "then $B$ is trivial if $B$ is the fundamental group of $A$";
			st = "$B$ is trivial if $B$ is the fundamental group of $A$";
			st = "then $p$ is a odd is $p$ is the fundamental group of $A$";
			st = "then $p$ is odd if $p$ is the fundamental group of $A$";
			st = "then $p$ is odd if $p$ is the fundamental group";
			st = "then $p$ is odd if $p$ is prime";//rule clashing issues!
			st = "then $p$ is odd if $p$ is prime"; 
			st = "Integers $p$ and $q$ are coprime if and only if there exist integers $n$ and $m$ such that $np - mq = 1$";
			//st = "Integers $p$ and $q$ are coprime if there exist integers";			
			st = "this morphism is called a noncommutative serre fibration";
			st = "$\\lambda$ run over all pairs of partitions which are complementary with respect to $R$";
			st = "$R_\\mathfrak m$ is universally catenary for all maximal ideals $\\mathfrak m$";
			st = "A morphism of C-algebras $f : A \\longrightarrow B$ with axiom is called a noncommutative Serre fibration";
			st = "a morphism of C-algebras $sfsff$ is called a fibration";		
			st = "the twisted $K$-theory $K^0(Y,\\cA)$ is isomorphic to the Grothendieck group of Neumann equivalence class of projections in $C(X, \\K_\\cA)$";
			//analyze this with syntaxnet:
			st = "there are fields in the class $\\mathbb{C}$ which are not finite modifications of rings"; //syntaxnet ordering example
			st =      "The interchange of two distant critical points of the surface diagram does not change the induced map on homology";			
			//st = "The interchange of two 4distant 5critical 6points of the 9surface diagram does not change the induced 16map on homology";
			st = "there exist fourty-eight hundred and eighty-six triangles";			
			st = "$p$ is prime";
			st = "$A$ implies ring over field";
			st = "The interchange of two distant critical points of the surface diagram does not change the induced map on homology";
			st = "signed resolution $res(T)$ coincide with $RR$";
			st = "that the set of all projections $X X$ such $ p -LRB- a -RRB- \\leq X $ is";			
			st = "topology of $X$ for which all the intervals of the form $XZ$ or $XY$";			
			st = "Assume that all $f\\in I$ with $\\deg f<n$ are in $I\\tp$ and take $f\\in I$ with $\\deg f=n$";			
			st = "$\\lambda$ run over all pairs of partitions which are complementary with respect to $R$";
			st = "The interchange of two distant critical points of the surface diagram does not change the induced map on homology";
			st = "this statement in full generality can lead to almost any conclusion";
			st = "$\\lambda$ run over all pairs of partitions which are complementary with respect to $R$";
			st = "field is ring";
			st = "this is a signed resolution over ring";
			st = "the polynomial $f$ has one root";
			st = "$\\lambda$ are all pairs of partitions which are complementary with respect to $R$";
			st = "if $x>0$";
			st = "if $A$, then $B$";
			st = "If $ \\|D(\\ Phi^k\\ varphi)(\\ Phi^k\\ varphi)^{-1}\\|_{L^1}= \\|D \\ varphi (\\ varphi)^{-1}\\|_{L^1}$ for all natural $k$, then \\[D \\ varphi(x)(\\ varphi(x))^{-1}=\\ alpha \\,\\ mboxAd_ {\\ varphi(x)} [D \\ varphi(Tx)(\\ varphi(Tx))^{-1}]\\] for every $x \\ in [-\\alpha^2,0)$. $\\ blacksquare$";
			st ="Let $H \\ in{\\ cal H}_u$ and $g \\ in N(H,u)$. ";
			//check this! Should get more accurate tex char out!
			st ="Then  \\[ g \\ in N^\\ast(H,u)\\ iff \\ overline{\\ langle u \\ rangle \\ pi(g)}=g \\ pi (H). \\]";
			st = "we associate to the global field $K$";
			st = "algebraic group";
			st = "let $G$ be this group, then $G$ is abelian";
			st = "let $k$ be a field";
			st = "assume $k$ is a field";
			st = "$K$ is said to be a field";
			st = "take $F$ to be a field"; //if F is a field
			st = "if F is a field";
			st = "$R/\\mathfrak p$ is catenary for every minimal prime $ \\ mathfrak p$";
			st = "take $x \\ elem R$.";
			st = "There are fields in the class $ \\ mathcal{X}$ that are not finite modifications of rings.";
			st = "If $ \\ sum a_k$ converges conditionally, ";
			st = "$ \\ lambda$ run over all pairs of partitions which are complementary with respect to $R$";
			st = "The interchange of two distant critical points of the surface diagram does not change the induced map on homology";
			st = "fix a rectangular Young diagram $R$ over a field"; //bad two-gram data .
			//improve context vector
			st = "curve $C$ covers field ";
			st = "field is global ring over group";
			st = "if this group consists of nilpotents"; 
			st = "let $H$ be a connected locally compact abelian group";
			st = "let $H$ be a simply connected group";
			st = "let $f(\\alpha) = Z$ be a point ";
			st = "rotationally symmetric space";
			st = "filter gently the fields over flags";
			st = "filter rings to form a ball";
			st = "filter the flags over ring";
			st = "age the blue cheese";
			st = "place soy sauce, lemon juice, and basil in blender";
			st = "place lemon juice in a blender";
			st = "Add hot pepper sauce and garlic";
			st = "Blend via high speed for 30 seconds";
			st = "place soy sauce and lemon juice and basil in blender";
			st = "place juice and basil over blender";
			st = "combine flour and salt";			
			st = "yeast over warm water in a large bowl";
			st = "take derivative of log of $f$";
			st = "quotient over ring is quotient";
			st = "Integers $p$ and $q$ are coprime if and only if there exist integers $n$ and $m$ such that $np-mq=1$";
			st = "the holonomy of $\\partial\\Sigma$ has no fixed points";
			st = "Sprinkle yeast over cold water in a large bowl";
			st = "there exist unbounded operator";
			st = "Suppose that the sequence~\\eqref{unbd-1} is an admissible unbounded resolution of length $n>1$ of the projection $P_ 0$.";
			st = "unbounded operator";
			st = "If $h \\in H^1$ is outer then as an unbounded operator $h$ has dense range and trivial kernel";
			st = "Let $A$ be a maximal subdiagonal algebra. If $h \\ in H^1$ is outer then as an unbounded operator $h$ has dense range and trivial kernel. Thus  $h = u |h|$ for a unitary $u \\ in M$.   Also, $ \\ Phi(h)$ has dense range and trivial kernel.";
			st = "Suppose that the sequence~\\eqref{unbd-1} is an admissible unbounded resolution of length $n>1$ of the projection $P_ 0$. Then the following assertions hold.";
			st = "spread chily in single layer in baking dish "; //spread chilly in single layer in baking dish
			st = "trim all fat from meat and cut into pencil-thing strips";
			st = "assemble tacos around the outer rim of the pizza"; //use
			st = "fill the middle of the pizza with guacomole";
			st = "top on green cilantro";
			st = "cut into eight slices";
			st = "warm tortillas on a pan or directly over fire";
			st = "add the desired amount of each ingredient into your taco";
			st = "then stir in the flour about 1 cup at a time";
			st = "Let stand for 5 minutes to proof";
			st = "in a large pan over medium heat add water";
			st = "add salt once crust is cooked";
			st = " stir in the flour about 1 cup at a time"; //knead on a floured surface until smooth
			st = "knead on a floured surface until smooth";//look 
			st = "warm tortillas on pan or directly over fire on medium-low heat";
			st = "warm tortillas on pan or directly over fire";
			st = "fill the middle of the pizza with guacomole";
			st = "roll out pizza dough into a circle";
			st = "make 1/2 cup";
			st = "drain and set aside";
			st = "cook noodles. Arrange noodles lengthwise over cheese";
			st = "There are fields in the class $\\mathcal {X} $ that are not finite modifications of rings";
			st = "combine with carrot";
			st = "stir eggs and banana";
			st = "laabel{thm:rig} Let h0:MomegaNh0:MomegaN be a harmonic mappings, where MM is compact and NN of nonpositive sectional curvature . Suppose that there exists a point pp in MM such that the followings hold: {rm (a)} at h0(p)h0(p) the Ricci tensor of NN is negative definite, {rm (b)} the differential map dh0(p)dh0(p) of h0h0 at pp is surjective. Then h0h0 is the only harmonic mapping in its homotopy class.\n" + 
					"if a finite group FF acts effectively and continuously on a closed aspherical manifold MM with centerless fundamental group π1(M)π1(M) , lawson and yau showed that the isometry group I(N)I(N) of a closed riemannian manifold NN of non-positive curvature has dimension equal to the rank of center π1(N)π1(N) ,";
			st = "Let $p\\equiv 1\\pmod 8$ be a rational prime and let $e\\geq 2$. We have $p\\in V(e)$ if and only if the equation \\begin{equation}x^2+p\\,y^2=(1+i)z^{2^{e-2}}  \\end{equation} has a solution $x,y,z\\in\\mathbb{Q}(i)$ with \\[(x-i\\,y)\\mathbb{Z}[i]+2\\,y\\mathbb{Z}[i]=\\mathbb{Z}[i].\\] "
					 +"suppose $d\\in R$ is a non-square . if one assumes that elliptic curves of rank $2$ are extremely rare ";
			st = "Suppose that the sequence $\\eqref{unbd-1}$ is an admissible unbounded resolution of length $n>1$ of the projection $P_ 0$.";
			st = "there exist infinitely many roots";
			st = "group decomposes as a free jj";
			st = "Suppose that the sequence $\\{s_i}$ is an admissible unbounded resolution of length $n>1$ where projection $P_0$.";
			st = "Suppose that the sequence $\\{s_i}$ is an admissible unbounded resolution of length $n$ where $n>0$.";
			st = "Given any function $f$, there are infinitely many roots in $g(zeta(f))$.";
			st = "The fundamental group of any fake projective plane does not split as a free nontrivial product with almagamation"
					+ "";
			st = "field is ring";
			st = "field is green and tastes good on toast";
			st= "The fundamental group of any fake projective plane decomposes as a free nontrivial product with almagamation";
			st="avocadoes grow in California and taste good on toast"; //double check this!!
			st="avocadoes grow in California and mexico"; 
			st = "fiber of genus one on surface";						
			st = "F is group cohomology cochain complex";
			st = "curve is genus one";
			st = "fiber of genus one on surface";
			st = "surface $F$ of genus $h$";
			st = "finitely generated cover";
			st = "Let $H$ be a finitely generated cover of one of $\\mathfrak G$ (as in Theorem GrHa+i),";
			st = "polynomial subspace";
			st = "let $V^n(d , mathbf m)$ be the subspace consisting of polynomials which vanish with the prescribed multiplicities at general points";
			st = "subspace consisting of polynomials which vanish at zeros";
			st = "reals extend rationals";
			st = "be tiled using as a tile the  triangle ";
			st = "let $sigma$ be a $y$ dimensional complex";
			st = "eigenvalues are homogeneous elements with valuation equal to the loop index";
			st = "Riemannian Dirac operator act in kernel of the dirac operator"; //add to test!
			st = "field extends in ring";
			st = "it has only Morse critical points";
			//this causes inf loop: st = "Now we can use fundamental solutions and their properties to define a pair of operators that will allow us to 
			//obtain the full set of solutions of the homogeneous Cauchy problems with compactly supported initial data starting from the space of compactly supported sections";
			st = "Cauchy problems with compactly supported initial data starting from the space of compactly supported sections";
			st = "Now we can use fundamental solutions and their properties to define a pair of operators that will allow us to "
					+ "obtain the full set of solutions of the homogeneous Cauchy problems with compactly supported initial data starting from the space of compactly supported sections";
			st = "let $f$ be a function. $f$ is smooth";
			st = "the topological group $G$ is extremely amenable";
			//st = "that will allow us to obtain the full set of solutions of the homogeneous Cauchy problems with compactly supported initial";
//of the homogeneous Cauchy problems with compactly supported initial
//data starting from the space of compactly supported sections.";
			
			//{28016=14606, 17465=-10, 14606=16206, 16206=14606}
			//st = " \\[ \\ begin{array}{l}  \\ frac{1}{\\ eta_ 1(R^1_T)}  \\ int_{R^1_T} \\ left(\\ int_{H_ 1/H_1\\ cap \\ Gamma_ 1} f(gh \\ Gamma_ 1)\\; d \\ nu_ 1(\\ dot{h})\\ right) \\,d \\ eta_ 1(\\ dot{g}) \\ \\[7pt] \\ qquad \\ \\ qquad =  (1/2)\\ int_{{\\ rm O}(n)} dk \\ cdot \\ int_{H_ 1/H_1\\ cap \\ Gamma_ 1}  d \\ nu_ 1(\\ dot{h})\\; {\\ scriptstyle \\ times} \\ \\[3pt] \\ qquad \\ \\ qquad \\ \\ qquad {\\ scriptstyle \\ times}\\;   \\ left (\\ frac{1}{\\ ell(D^1_T)} \\ int_{(\\ mbox{\\ boldmath{$ \\ scriptstyle t$}},\\ mbox{\\ boldmath{$ \\ scriptstyle x$}})\\ in D^1_T}  f(k \\ Psi(\\ mbox{\\ boldmath{$t$}},\\ mbox{\\ boldmath{$x$}})\\ Gamma_ 1)\\; d \\ mbox{\\ boldmath{$t$}}\\, d \\ mbox{\\ boldmath{$x$}} \\ right).  \\end{array} \\]";
			//st = "Let $p_1,\\dots,p_r$ be the preimages under $w$"; 			
			//st = "$p_1,\\dots,p_r$ is the preimage under $w$ of $c^\\ast_0$";			
			//st = "there are complex parameters";
			//st = "given $A  $ such that $A = o$";
			//st = "take the derivative of $f$";
			//st = "$A $ is isomorphic to $B $ of $C $ in $D $";
			//st = "given extension of ring";
			//If the Alexander polynomial of $K$ is not $1$
			//st = "Suppose that $f_n->f$ pointwise";
			//st = "Suppose that $f_n->g$ uniformly on $[a,b]$";			
			//st = "Then we have $f=g$";			
			//st = "$abc $ is right exact over $R$";
			//st = " $\\Probsub_x$ is the law of $\\bfPhi$ conditional on $\\Phi(0)=x,$ and $\\Expect_x$ is the corresponding expectation.";
			//st = "two vectors $x$ and $y$ are adjacent";
			//st = "Integers $p$ and $q$ are coprime if and only if there exist integers $n$ and $m$ such that $np - mq = 1$";
			//st = "Integers $p$ and $q$ are coprime if there exist an integer $n$ such that $np - mq = 1$";
			//st = "Integers $p$ and $q$ are coprime if there exist an integer $n$";			
			//st = "The product of two primitive polynomials is primitive.";
			//st = "$A $ is said to be prime";
			//st = "then all integers are prime";
			//st = "The variables $x $ and $ y$ converge in distribution.";			
			//st = "$A$ is isomorphic to $B$";
			//st = "take the log of $f$ over the field";
			//st = "field lies above ring";
			//st = "given a tower of algebraic field extensions";
			//Every minimal subsystem $\Sigma$ of the system $(\Omega^k,S_\infty)$ is a factor of the minimal system $(\Omega^2_{lo},S_\infty)$.		
			//st = "take derivative of log of f";
			//st = "given infinite subgroup where $\\lambda$ is an eigenvalue";
			//st = "there exists a field and a ring which is a group algebra ";			
			//st = "field has ring";
			//st = "given The image of a constructible subset";				
			//st = "Let $F$ be a field. $F$ is a ring";			
			//st = "then $x> 0$";
			//st = "if $F$ is a field";
			//st = "$f$ induces a map of fields";
			//st = "field is finitely presented";
			//st = "$R $ that is a field and that is a ring is a field";			
			//st = "then $\\mu(E_j)=0$"; //converting to assert!			
			//st = "given disjoint subset of $X$";
			//st = "given point $c$ in $[a,b]$ such that $f(x) \\leq f(c)$ for all $x \\in [a,b]$";			
			//st = "X is connected ";
			//st = "is these fields are perfect";
			//st = "if it is both an $A$-module and a $B$-module"; //<--need to know which part to skip if doesn't lead to full parse
			//st = "these fields without question are perfect"; //<--use this to test dropping out
			
			//st = "we define $F$ by the field";
			//st = "there exists a ring map $R \\to S$ of finite presentation such that $T$ is the image of $\\Spec(S)$ in $\\Spec(R)$."; //<--too many parses!!
			//st = "given field, with $F $ of presentation, and $G $ of finite type";
			//st = "if $R$ is commutative and $S$ is commutative, then $S$ is abelian if $T$ is abelian";
			//st = "then $M$ is finitely presented as an $S$-module.";
			//st = "Assume $R to S$ is of finite type";
			//st = "if $R$ is commutative, $S$ is abelian if $T$ is abelian";
			//st = "$f$ maps $a$ to $b$";
			//st = "$f$ map ring";
			//st = "Group $G$ acts on space $X$";
			//st = "$F$ is field, so is $G$";
			//st = "regular local ring";
			//st = "Let $R$ be integral domain";
			//st = "$k subset k' subset K$ is a field";
			//st = "consider a ring such that field is separable algebraic and field is ring";
			//st = "$k subset k' subset K$ is field";
			//st = "$Z$ is a an open set in $X$";
			//st = "it gives a group between field and ring";
			//st = "field between field and ring";
			//st = "The category of $S^{-1}R$-modules is $R$-modules $N$ with the property that every $s in S$ acts as an automorphism on $N$.";
			//st = " and item as an $R$-module define for $m in M_i$ and $x in R$ the product of $x$ and the class of $m$ in $M$ to be the class of $xm$ in $M$.";
			//st = "$pth$ power in field";
			//st = "a field is a ring";
			//st = "Assume that $B$ is Noetherian and Cohen-Macaulay and that $\\mathfrak m_B = (\\mathfrak m_A) B}$"; //**<--revisit!
			//st = "ring $R_p$ is regular, for every $p$";
			//st = "$R/\\mathfrak p$ is catenary for every minimal prime $\\mathfrak p$";
			//st = "for every minimal prime $\\p$";
			
			//st = "quotient over ring is quotient";
			//st = "$f$ is holomorphic on $D(0, r)$, the derivative of $f$ is $\\sum_j j $";
			//st = "$r $ is catenary "; 
			//st = "$R$ is field if and only if it is a field";
			//st = "there exists a unique power series $g(T)$ such that $f(g(T)) = T$";			
			//st = "$f$ is holomorphic on $D(0, r)$, the derivative of $f$ is $\\sum_j j $";
			//st = "the derivative of the log of $x$ is equal to $1/x$";
			//st = "f has radius of convergence r";
			//st = "Holomorphic functions are analytic.";
			//st = "the map p is said to be a quotient map given  a subset U of Y is open in Y";
			//st = "given that a subset U of Y is open in Y";
			//st = "U is an open set in Y";
			//st = "let U be an open set in Y";
			//st = "subset U of Y is open in Y";
			//st = "log of f";
			//st = "given an element f of a set $S$"; 
			//st = "f is a function with radius of convergence r and finitely many roots";
			//st = "let S be the union of elements of a field";
			//st = "f is a function with radius of convergence r";			
			//st = "f is function with radius";
			//st = "$f$ is a set";
			//st = "the derivative is $f=s$";

			//System.out.println("from TexConverter: " + TexConverter.convert("let $m \\subset M$ be an element"));			
			
			ParseStateBuilder parseStateBuilder = new ParseStateBuilder();
			parseStateBuilder.setWriteUnknownWordsToFile(WRITE_UNKNOWN_WORDS_TO_FILE);
			
			/*******whether or not to process text from above********/			
			boolean processText = true;
			ParseState parseState = parseStateBuilder.build();
			
			if(processText){	
				boolean isVerbose = true;
				try{
					ParseRun.parseInput(st, parseState, isVerbose);
					
					//BigInteger relVec = parseState.getRelationalContextVec();
					//Map<Integer,Integer> contextVec = parseState.getCurThmCombinedContextVecMap();
					
					/*List<Map<Integer,Integer>> contVecList = new ArrayList<Map<Integer,Integer>>();
					contVecList.add(contextVec);
					FileUtils.serializeObjToFile(contVecList, "src/thmp/data/sampleContextVec.dat");
					
					List<BigInteger> relVecList = new ArrayList<BigInteger>();
					relVecList.add(relVec);
					FileUtils.serializeObjToFile(relVecList, "src/thmp/data/sampleRelVec.dat");*/
					
					/*@SuppressWarnings("unchecked")
					List<ContextRelationVecPair> vecsList = (List<ContextRelationVecPair>)
							FileUtils.deserializeListFromFile("/Users/yihed/Documents/workspace/SemanticMath/src/thmp/data/vecs/contextRelationVecPairList49");
					List<ContextRelationVecPair> shortVecsList = new ArrayList<ContextRelationVecPair>();
					List<Map<Integer,Integer>> mapsList = new ArrayList<Map<Integer,Integer>>();
					List<BigInteger> relVecsList = new ArrayList<BigInteger>();
					int vecsListSz = vecsList.size();
					for(int i = vecsListSz-50; i < vecsListSz; i++) {
						shortVecsList.add(vecsList.get(i));
						mapsList.add(vecsList.get(i).contextVecMap());
						relVecsList.add(vecsList.get(i).relationVec());
					}
					
					FileUtils.serializeObjToFile(shortVecsList, "src/thmp/data/shortVecsList.dat");
					
					FileUtils.serializeObjToFile(mapsList, "src/thmp/data/shortContextMapList.dat");
					FileUtils.serializeObjToFile(relVecsList, "src/thmp/data/shortRelVecList.dat");
					
					System.out.println("vecsList.size(): "+vecsList.size());*/
					
				}catch(StackOverflowError e){
					System.out.println("ERRRRRROOORRRRRRRR SOF!");
				}
			}
			System.out.println("ThmP1TestRun - parseState.getGlobalVariableNamesMMap " + parseState.getGlobalVariableNamesMMap()); 
			System.out.println("ThmP1TestRun - parseState.localVariableNamesMMap " + parseState.getLocalVariableNamesMMap()); 
			
			//System.out.println("parseState contextVecMap " + parseState.getCurThmCombinedContextVecMap());
			boolean streamInput = false;
			if(streamInput){
				Scanner sc = new Scanner(System.in);
				String inputStr;
				while(sc.hasNextLine()){
					inputStr = sc.nextLine();
					boolean isVerbose = true;
					ParseRun.parseInput(inputStr, parseState, isVerbose);
				}
				sc.close();
			}
			
			/*******whether to process file or not********/
			boolean processFile = false;
			
			if(processFile){
				
				//Scanner sc = new Scanner(new File("src/thmp/data/samplePaper2.txt"));
				Scanner sc = new Scanner(new File("/Users/yihed/Downloads/math0404441"));	
				
				//Scanner sc = new Scanner(new File("/Users/yihed/Downloads/spectral.tex"));
				//Scanner sc = new Scanner(new File("src/thmp/data/collectThmTestSample.txt"));
				parseState = parseStateBuilder.build();
				
				while(sc.hasNextLine()){				
					
					String nextLine = sc.nextLine();
					st = nextLine;
					if(st.matches("^\\s*$")) continue;
					System.out.println("*~~~*");					
					nextLine = ThmInput.removeTexMarkup(nextLine, null, null);
					System.out.println(nextLine + "\n");
					boolean isVerbose = true;
					System.out.println("ThmP1TestRun - parsing: " + st);
					ParseRun.parseInput(nextLine, parseState, isVerbose);
					System.out.println("ThmP1TestRun - DONE parsing: " + st);
					parseState.parseRunLocalCleanUp();
				}		
				
				sc.close();
			}
			
			if(WRITE_UNKNOWN_WORDS_TO_FILE){
				parseState.writeUnknownWordsToFile();
			}
		}
	
}
